Rename function parameters from index to index_ to prevent clash with BSD
authorMatthias Clasen <maclas@gmx.de>
Wed, 2 Jun 2004 03:16:03 +0000 (03:16 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Wed, 2 Jun 2004 03:16:03 +0000 (03:16 +0000)
Tue Jun  1 23:14:46 2004  Matthias Clasen  <maclas@gmx.de>

* gtk/gtktoolbar.h:
* gtk/gtktoolbar.c:
* gtk/gtkentrycompletion.h:
* gtk/gtkentrycompletion.c:
* gtk/gtkcombobox.h:
* gtk/gtkcombobox.c: Rename function parameters from
index to index_ to prevent clash with BSD index().  (#143001)

ChangeLog
ChangeLog.pre-2-10
ChangeLog.pre-2-6
ChangeLog.pre-2-8
gtk/gtkcombobox.c
gtk/gtkcombobox.h
gtk/gtkentrycompletion.c
gtk/gtkentrycompletion.h
gtk/gtktoolbar.c
gtk/gtktoolbar.h

index 30c18447ad7b64e62abe5d034cc17654e3816353..8567a6664465c4f8e758b7181e5c3942ad4a8f29 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+Tue Jun  1 23:00:20 2004  Matthias Clasen  <maclas@gmx.de>
+
+       * gtk/gtktoolbar.h: 
+       * gtk/gtktoolbar.c: 
+       * gtk/gtkentrycompletion.h: 
+       * gtk/gtkentrycompletion.c: 
+       * gtk/gtkcombobox.h: 
+       * gtk/gtkcombobox.c: Rename function parameters from
+       index to index_ to prevent clash with BSD index().  (#143001)
+
 Tue Jun  1 22:45:42 2004  Matthias Clasen  <maclas@gmx.de>
 
        * gtk/gtkmenu.c (get_accel_path): Handle accel_closure being
index 30c18447ad7b64e62abe5d034cc17654e3816353..8567a6664465c4f8e758b7181e5c3942ad4a8f29 100644 (file)
@@ -1,3 +1,13 @@
+Tue Jun  1 23:00:20 2004  Matthias Clasen  <maclas@gmx.de>
+
+       * gtk/gtktoolbar.h: 
+       * gtk/gtktoolbar.c: 
+       * gtk/gtkentrycompletion.h: 
+       * gtk/gtkentrycompletion.c: 
+       * gtk/gtkcombobox.h: 
+       * gtk/gtkcombobox.c: Rename function parameters from
+       index to index_ to prevent clash with BSD index().  (#143001)
+
 Tue Jun  1 22:45:42 2004  Matthias Clasen  <maclas@gmx.de>
 
        * gtk/gtkmenu.c (get_accel_path): Handle accel_closure being
index 30c18447ad7b64e62abe5d034cc17654e3816353..8567a6664465c4f8e758b7181e5c3942ad4a8f29 100644 (file)
@@ -1,3 +1,13 @@
+Tue Jun  1 23:00:20 2004  Matthias Clasen  <maclas@gmx.de>
+
+       * gtk/gtktoolbar.h: 
+       * gtk/gtktoolbar.c: 
+       * gtk/gtkentrycompletion.h: 
+       * gtk/gtkentrycompletion.c: 
+       * gtk/gtkcombobox.h: 
+       * gtk/gtkcombobox.c: Rename function parameters from
+       index to index_ to prevent clash with BSD index().  (#143001)
+
 Tue Jun  1 22:45:42 2004  Matthias Clasen  <maclas@gmx.de>
 
        * gtk/gtkmenu.c (get_accel_path): Handle accel_closure being
index 30c18447ad7b64e62abe5d034cc17654e3816353..8567a6664465c4f8e758b7181e5c3942ad4a8f29 100644 (file)
@@ -1,3 +1,13 @@
+Tue Jun  1 23:00:20 2004  Matthias Clasen  <maclas@gmx.de>
+
+       * gtk/gtktoolbar.h: 
+       * gtk/gtktoolbar.c: 
+       * gtk/gtkentrycompletion.h: 
+       * gtk/gtkentrycompletion.c: 
+       * gtk/gtkcombobox.h: 
+       * gtk/gtkcombobox.c: Rename function parameters from
+       index to index_ to prevent clash with BSD index().  (#143001)
+
 Tue Jun  1 22:45:42 2004  Matthias Clasen  <maclas@gmx.de>
 
        * gtk/gtkmenu.c (get_accel_path): Handle accel_closure being
index cf0288bbf6a978693c26fd3459087fea53c22376..08d32ef96280a1cdc4c3a0830765b7a6fdeae1e8 100644 (file)
@@ -1948,13 +1948,13 @@ gtk_combo_box_menu_destroy (GtkComboBox *combo_box)
 
 static void
 gtk_combo_box_item_get_size (GtkComboBox *combo_box,
-                             gint         index,
+                             gint         index_,
                              gint        *cols,
                              gint        *rows)
 {
   GtkTreeIter iter;
 
-  gtk_tree_model_iter_nth_child (combo_box->priv->model, &iter, NULL, index);
+  gtk_tree_model_iter_nth_child (combo_box->priv->model, &iter, NULL, index_);
 
   if (cols)
     {
@@ -3372,7 +3372,7 @@ gtk_combo_box_get_active (GtkComboBox *combo_box)
 /**
  * gtk_combo_box_set_active:
  * @combo_box: A #GtkComboBox.
- * @index: An index in the model passed during construction, or -1 to have
+ * @index_: An index in the model passed during construction, or -1 to have
  * no active item.
  *
  * Sets the active item of @combo_box to be the item at @index.
@@ -3381,16 +3381,16 @@ gtk_combo_box_get_active (GtkComboBox *combo_box)
  */
 void
 gtk_combo_box_set_active (GtkComboBox *combo_box,
-                          gint         index)
+                          gint         index_)
 {
   g_return_if_fail (GTK_IS_COMBO_BOX (combo_box));
   /* -1 means "no item selected" */
-  g_return_if_fail (index >= -1);
+  g_return_if_fail (index_ >= -1);
 
-  if (combo_box->priv->active_item == index)
+  if (combo_box->priv->active_item == index_)
     return;
   
-  gtk_combo_box_set_active_internal (combo_box, index);
+  gtk_combo_box_set_active_internal (combo_box, index_);
 }
 
 static void
index ce7cc18877a5ab4d6f5b7b9e4fe47a4e2755aa15..7ecccbfd743ddb23130772342fb3e2c0ab2587a0 100644 (file)
@@ -83,7 +83,7 @@ void          gtk_combo_box_set_add_tearoffs       (GtkComboBox *combo_box,
 /* get/set active item */
 gint          gtk_combo_box_get_active       (GtkComboBox     *combo_box);
 void          gtk_combo_box_set_active       (GtkComboBox     *combo_box,
-                                              gint             index);
+                                              gint             index_);
 gboolean      gtk_combo_box_get_active_iter  (GtkComboBox     *combo_box,
                                               GtkTreeIter     *iter);
 void          gtk_combo_box_set_active_iter  (GtkComboBox     *combo_box,
index 70fbb4af1b18a0ff1a5ff00b798167fe8a2c8d40..4747cb3a8115287ee187beb2b39a5339cefbfdea 100644 (file)
@@ -972,10 +972,10 @@ gtk_entry_completion_insert_action (GtkEntryCompletion *completion,
 /**
  * gtk_entry_completion_insert_action_text:
  * @completion: A #GtkEntryCompletion.
- * @index: The index of the item to insert.
+ * @index_: The index of the item to insert.
  * @text: Text of the item to insert.
  *
- * Inserts an action in @completion's action item list at position @index
+ * Inserts an action in @completion's action item list at position @index_
  * with text @text. If you want the action item to have markup, use
  * gtk_entry_completion_insert_action_markup().
  *
@@ -983,57 +983,57 @@ gtk_entry_completion_insert_action (GtkEntryCompletion *completion,
  */
 void
 gtk_entry_completion_insert_action_text (GtkEntryCompletion *completion,
-                                         gint                index,
+                                         gint                index_,
                                          const gchar        *text)
 {
   g_return_if_fail (GTK_IS_ENTRY_COMPLETION (completion));
   g_return_if_fail (text != NULL);
 
-  gtk_entry_completion_insert_action (completion, index, text, FALSE);
+  gtk_entry_completion_insert_action (completion, index_, text, FALSE);
 }
 
 /**
  * gtk_entry_completion_insert_action_markup:
  * @completion: A #GtkEntryCompletion.
- * @index: The index of the item to insert.
+ * @index_: The index of the item to insert.
  * @markup: Markup of the item to insert.
  *
- * Inserts an action in @completion's action item list at position @index
+ * Inserts an action in @completion's action item list at position @index_
  * with markup @markup.
  *
  * Since: 2.4
  */
 void
 gtk_entry_completion_insert_action_markup (GtkEntryCompletion *completion,
-                                           gint                index,
+                                           gint                index_,
                                            const gchar        *markup)
 {
   g_return_if_fail (GTK_IS_ENTRY_COMPLETION (completion));
   g_return_if_fail (markup != NULL);
 
-  gtk_entry_completion_insert_action (completion, index, markup, TRUE);
+  gtk_entry_completion_insert_action (completion, index_, markup, TRUE);
 }
 
 /**
  * gtk_entry_completion_delete_action:
  * @completion: A #GtkEntryCompletion.
- * @index: The index of the item to Delete.
+ * @index_: The index of the item to Delete.
  *
- * Deletes the action at @index from @completion's action list.
+ * Deletes the action at @index_ from @completion's action list.
  *
  * Since: 2.4
  */
 void
 gtk_entry_completion_delete_action (GtkEntryCompletion *completion,
-                                    gint                index)
+                                    gint                index_)
 {
   GtkTreeIter iter;
 
   g_return_if_fail (GTK_IS_ENTRY_COMPLETION (completion));
-  g_return_if_fail (index >= 0);
+  g_return_if_fail (index_ >= 0);
 
   gtk_tree_model_iter_nth_child (GTK_TREE_MODEL (completion->priv->actions),
-                                 &iter, NULL, index);
+                                 &iter, NULL, index_);
   gtk_list_store_remove (completion->priv->actions, &iter);
 }
 
index 1a3cacf499f2a6c5c22675defcb8295e98c1e433..5bdcc4c1ca5df74e6d3e53c73891b0e68d0e766a 100644 (file)
@@ -62,7 +62,7 @@ struct _GtkEntryCompletionClass
                                  GtkTreeModel       *model,
                                  GtkTreeIter        *iter);
   void     (* action_activated) (GtkEntryCompletion *completion,
-                                 gint                index);
+                                 gint                index_);
 
   /* Padding for future expansion */
   void (*_gtk_reserved0) (void);
@@ -91,13 +91,13 @@ gint                gtk_entry_completion_get_minimum_key_length (GtkEntryComplet
 void                gtk_entry_completion_complete               (GtkEntryCompletion          *completion);
 
 void                gtk_entry_completion_insert_action_text     (GtkEntryCompletion          *completion,
-                                                                 gint                         index,
+                                                                 gint                         index_,
                                                                  const gchar                 *text);
 void                gtk_entry_completion_insert_action_markup   (GtkEntryCompletion          *completion,
-                                                                 gint                         index,
+                                                                 gint                         index_,
                                                                  const gchar                 *markup);
 void                gtk_entry_completion_delete_action          (GtkEntryCompletion          *completion,
-                                                                 gint                         index);
+                                                                 gint                         index_);
 
 /* convenience */
 void                gtk_entry_completion_set_text_column        (GtkEntryCompletion          *completion,
index 6bc61aa4136d58966bc399d4c6668845afc90379..82bd8e9860da67e4e5fbb136845ccbefe6ca4cc7 100644 (file)
@@ -2013,11 +2013,12 @@ logical_to_physical (GtkToolbar *toolbar,
  * gtk_toolbar_set_drop_highlight_item:
  * @toolbar: a #GtkToolbar
  * @tool_item: a #GtkToolItem, or %NULL to turn of highlighting
- * @index: a position on @toolbar
+ * @index_: a position on @toolbar
  * 
  * Highlights @toolbar to give an idea of what it would look like
- * if @item was added to @toolbar at position indicated by @index. If @item
- * is %NULL, highlighting is turned off. In that case @index is ignored.
+ * if @item was added to @toolbar at the position indicated by @index_. 
+ * If @item is %NULL, highlighting is turned off. In that case @index_ 
+ * is ignored.
  *
  * The @tool_item passed to this function must not be part of any widget
  * hierarchy. When an item is set as drop highlight item it can not
@@ -2029,7 +2030,7 @@ logical_to_physical (GtkToolbar *toolbar,
 void
 gtk_toolbar_set_drop_highlight_item (GtkToolbar  *toolbar,
                                     GtkToolItem *tool_item,
-                                    gint         index)
+                                    gint         index_)
 {
   ToolbarContent *content;
   GtkToolbarPrivate *priv;
@@ -2060,8 +2061,8 @@ gtk_toolbar_set_drop_highlight_item (GtkToolbar  *toolbar,
     }
   
   n_items = gtk_toolbar_get_n_items (toolbar);
-  if (index < 0 || index > n_items)
-    index = n_items;
+  if (index_ < 0 || index_ > n_items)
+    index_ = n_items;
   
   if (tool_item != priv->highlight_tool_item)
     {
@@ -2077,15 +2078,15 @@ gtk_toolbar_set_drop_highlight_item (GtkToolbar  *toolbar,
                             GTK_WIDGET (toolbar));
     }
   
-  index = logical_to_physical (toolbar, index);
+  index_ = logical_to_physical (toolbar, index_);
   
-  content = g_list_nth_data (priv->content, index);
+  content = g_list_nth_data (priv->content, index_);
   
-  if (index > 0)
+  if (index_ > 0)
     {
       ToolbarContent *prev_content;
       
-      prev_content = g_list_nth_data (priv->content, index - 1);
+      prev_content = g_list_nth_data (priv->content, index_ - 1);
       
       if (prev_content && toolbar_content_is_placeholder (prev_content))
        content = prev_content;
@@ -2099,7 +2100,7 @@ gtk_toolbar_set_drop_highlight_item (GtkToolbar  *toolbar,
 
       content = toolbar_content_new_tool_item (toolbar,
                                               GTK_TOOL_ITEM (placeholder),
-                                              TRUE, index);
+                                              TRUE, index_);
       gtk_widget_show (placeholder);
     }
   
index 1bf6ee9d6ff921d2b39aa098bed7effab1d9b2d5..3b005bb930ab60c32a464fe9017b0baa6281badc 100644 (file)
@@ -162,7 +162,7 @@ gint            gtk_toolbar_get_drop_index          (GtkToolbar      *toolbar,
                                                     gint             y);
 void            gtk_toolbar_set_drop_highlight_item (GtkToolbar      *toolbar,
                                                     GtkToolItem     *tool_item,
-                                                    gint             index);
+                                                    gint             index_);
 
 /* internal functions */
 gchar *         _gtk_toolbar_elide_underscores      (const gchar     *original);